home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #3 / Amiga Plus CD - 2002 - No. 03.iso / AmiSoft / Dev / Gui / Cit.readme < prev    next >
Encoding:
Text File  |  2003-02-24  |  1.9 KB  |  73 lines

  1. Short:    A C++ GUI dev system
  2. Author:   Svend@DaugaardPedersen.dk (Svend Daugaard Pedersen)
  3. Uploader: Svend@DaugaardPedersen.dk (Svend Daugaard Pedersen)
  4. Type:     dev/gui
  5. Replaces: dev/gui/CIT
  6.  
  7. CIT version 4.02 (2003.02.15)
  8.  
  9. CIT is a C++ development system.
  10.  
  11. The purpose with CIT (C++ Intuition Tool) is twofold:
  12.  
  13.  - to offer the programmer an easy way to create GUIs
  14.  
  15.  - to offer the programmer the possibility to make event driven programs.
  16.  
  17.  
  18.  
  19. Here is a very simple example program that opens a window with a palette
  20. gadget and a button (Quit) gadget and waits for the user to press Quit or
  21. the windows close gadget:
  22.  
  23.  
  24.    #include <CITGroup.h>
  25.    #include <CITButton.h>
  26.    #include <CITPalette.h>
  27.  
  28.    CITApp Application;
  29.  
  30.    CITWorkbench DemoScreen;
  31.    CITWindow    DemoWindow;
  32.    CITVGroup    winGroup;
  33.    CITPalette   palette;
  34.    CITButton    quitButton;
  35.  
  36.    void CloseEvent() { Application.Stop(); }
  37.    void QuitEvent(ULONG ID) { Application.Stop(); }
  38.  
  39.    int main()
  40.    {
  41.      BOOL Error=FALSE;
  42.  
  43.      // Build GUI
  44.      //
  45.      DemoScreen.InsObject(DemoWindow,Error);
  46.        DemoWindow.CloseGadget();
  47.        DemoWindow.SizeGadget();
  48.        DemoWindow.DepthGadget();
  49.        DemoWindow.Caption("CITPalette Demo");
  50.        DemoWindow.CloseEventHandler(CloseEvent);
  51.        DemoWindow.InsObject(winGroup,Error);
  52.          winGroup.SpaceOuter();
  53.          winGroup.InsObject(palette,Error);
  54.            palette.MinWidth(200);
  55.            palette.MinHeight(150);
  56.            palette.NumColours(256);
  57.          winGroup.InsObject(quitButton,Error);
  58.            quitButton.Text("Quit");
  59.            quitButton.MaxHeight(20);
  60.            quitButton.EventHandler(QuitEvent);
  61.  
  62.      // Put the screen into Application to create the GUI and set up
  63.      // the event system
  64.      //
  65.      Application.InsObject(DemoScreen,Error);
  66.  
  67.      if( Error ) return 10;
  68.  
  69.      Application.Run(); // Will return when Quit or close gadget is pressed
  70.  
  71.      return 0;
  72.    }
  73.